package com.example.stock.entity.eo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Objects;

/**
 * stock_stat_optimize
 * @author 
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("stat_param")
public class StatParamEo {
    private Integer m;

    private Integer n;

    private Double money;

    @TableId
    private String tsCode;

    private String freq;

    private String strategy;

    private LocalDateTime openTime;

    private LocalDateTime closeTime;

    private Double openPrice;

    private Double closePrice;

    private Double priceRate;

    private Double moneyRate;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        StatParamEo that = (StatParamEo) o;
        return Objects.equals(m, that.m) &&
                Objects.equals(n, that.n) &&
                Objects.equals(freq, that.freq) &&
                Objects.equals(strategy, that.strategy);
    }

    @Override
    public int hashCode() {
        return Objects.hash(m, n, freq, strategy);
    }
}